<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>BOM</title>
</head>
<body>

<p>
    1.window对象: js层级中的顶级对象,表示浏览器窗口
</p>

<p>
    2.navigator对象: 包含了浏览器的信息
</p>

<p>
    3.screen对象: 包含了当前显示器的信息
</p>

<p>
    4.history对象: 控制历史记录
</p>

<p>
    5.location对象: 包含当前URL的信息
</p>


<input type="button" value="返回上一页"
       onclick="backOne()">

<script>

    var a = 3;

    console.log(a);

    console.log(window.a);

    function func() {
        console.log("测试");
    }

    window.func();

    // navigator对象

    console.log(window.navigator.userAgent);
    console.log(navigator.appName);
    console.log(navigator.appVersion);
    console.log(navigator.language);
    // 当前浏览器是否启用cookie
    console.log(navigator.cookieEnabled);

    // screen
    console.log(screen.width);
    console.log(screen.height);

    console.log(screen.availWidth);
    console.log(screen.availHeight);


    function backOne() {
        history.back();

        // 前进到下一页.
        // history.forward();
    }

</script>
</body>
</html>